package com.demo.gulimall.ware.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("wms_purchase_detail")
public class PurchaseDetail implements Serializable {
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** 采购单id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`purchase_id`")
	private Long purchaseId;

	/** 采购商品id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`sku_id`")
	private Long skuId;

	/** 采购数量 */
	@TableField(value = "`sku_num`")
	private Integer skuNum;

	/** 采购金额 */
	@TableField(value = "`sku_price`")
	private BigDecimal skuPrice;

	/** 仓库id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`ware_id`")
	private Long wareId;

	/** 状态[0新建，1已分配，2正在采购，3已完成，4采购失败] */
	@TableField(value = "`status`")
	private Integer status;

}
